//Copyright(c) 2013, KEYENCE Corporation. All rights reserved.
// OpenEthernetDlg.cpp :Implementation file
//

//#include "stdafx.h"
//#include "LJV_DllSampleAll.h"
#include "OpenEthernetDlg.h"


// COpenEthernetDlg Dialog

//IMPLEMENT_DYNAMIC(COpenEthernetDlg, CDialog)

COpenEthernetDlg::COpenEthernetDlg(/*WORD PortNum*/)
	
{
	//m_xvPortNum=PortNum;
}

COpenEthernetDlg::~COpenEthernetDlg()
{
}


//BOOL COpenEthernetDlg::OnInitDialog()
//{
//
//	m_xcIPAddress.SetAddress(192, 168, 0, 1);
//
//	return TRUE;
//}

// COpenEthernetDlg Message handler
/*
 Get Ethernet Config
 @return LJV7IF_ETHERNET_CONFIG
*/
LJV7IF_ETHERNET_CONFIG COpenEthernetDlg::GetEthernetConfig(BYTE port,WORD PortNum)
{
	LJV7IF_ETHERNET_CONFIG ethernetConfig;
	DWORD ipAddress = m_dwIPAddress;
	WORD m_xvPortNum=PortNum;

	ethernetConfig.abyIpAddress[0] = (BYTE)(192);
	ethernetConfig.abyIpAddress[1] = (BYTE)(168);
	ethernetConfig.abyIpAddress[2] = (BYTE)(0);
	ethernetConfig.abyIpAddress[3] = (BYTE)( port);
	ethernetConfig.wPortNo         = (WORD)m_xvPortNum;
	ethernetConfig.reserve[0]      = (BYTE)0;
	ethernetConfig.reserve[1]      = (BYTE)0;

	return ethernetConfig;
}

/*
 "OK" button clicked
*/
//void COpenEthernetDlg::OnBnClickedOk()
//{
//	m_xcIPAddress.GetAddress(m_dwIPAddress);
//	
//}
